package com.sunxueqi.common.util;

import java.util.Random;

public class KeyGenerate {
	/**
	 * ID生成
	 * @return
	 */
	public static String getKeyId() {
		//取当前时间的long值包含毫秒
		long millis = System.currentTimeMillis();
		//加上两位随机数
		Random random = new Random();
		int endNum = random.nextInt(99);
		//如果不足两位前面补0
		String str = millis + String.format("%02d", endNum);
		return str;
	}
	
}
